pp108 : The Anchoring Feature

The Anchoring Feature

This topic presents an overview of the Anchoring feature.


In common terms, Anchoring refers to securing the position of any object with respect to its surroundings.

In Process Platform XForms, Anchoring involves specifying fixed positions for user interface (UI) elements on a free layout. This feature enables you to define the absolute positioning of a control with reference to the edges of its immediate parent element.

Process Platform supports anchoring of controls on an XForm, in a composite control, or in a split area. The anchoring feature is available for all freely-positioned controls in a layout. By default, all controls are anchored to the parent control at the top and the left side.

The anchoring feature in Process Platform XForms emulates the behavior specified by the W3C consortium. For information about the standards defined by W3C, see the Absolute Positioning module of the W3C- CSS 2.1 specification for Visual formatting model.

You can anchor controls on all sides, or specify varying anchoring distances for each side. Additionally, you can also dock a control such that its edges are equidistant from the parent control or such that there is no space between the control and its parent control. The dimensions of a control that is anchored on all sides change, when the parent control is resized.

On anchoring a control to an edge of its parent control, the corresponding anchor bar is highlighted. Place the cursor on the anchor bar to view the anchor size in an editable field.
Consider the following while anchoring controls:

  • A control that is anchored on two sides does not resize when you resize the XForm. When anchoring at two sides, you cannot anchor the control at two opposite sides.
  • The default anchor unit is pixel (px).
  • The anchor size is distance from the parent's edge to the anchored control's edge. You can specify the anchor size in pixels (px), points (pt), em, ex, millimeters (mm), centimeters (cm), inches (in), and percentages (%). When specified in percentage, the anchor size is calculated based on the visible size of the parent control.
  • The controls that cannot be resized vertically such as Input, Password, Output, Check, and Select, cannot be anchored on more than three sides. You also cannot anchor these controls to both the top and the bottom of the XForm simultaneously.
  • You cannot anchor a collapsible Groupbox on more than three sides. The collapsible behavior is useful in saving space in an XForm with a vertical layout, automatically repositioning the controls below a collapsible Groupbox. Although these concerns are not relevant to a free layout, anchoring a collapsible Groupbox on all sides is not supported.
  • The anchoring feature is not supported for the Toolbar and Element bar buttons, and the controls in a Table control. For these controls, you can anchor the control's container or parent control, as applicable.
  • A control that is anchored at the bottom or the right side may not be displayed when the size of the XForm is reduced. The XForm does not display scroll bars to view such controls if they are anchored on all sides. To avoid this, Process Platform recommends that you do not leave the top or the left side of a control unanchored, especially when the run-time and design-time size of an XForm vary greatly.